package com.tanger.im.event;

import org.springframework.context.ApplicationEvent;

/**
 * @Description 定义事件基础类:用于业务解耦
 * @Author Hchenbin
 * @Date 2023/12/29 16:56
 * @Version 1.0
 */
public class IMChatEvent extends ApplicationEvent {

    /**
     * 组群ID
     */
    private Long groupId;
    /**
     * 发送人ID
     */
    private Long fId;
    /**
     * 接收人ID
     */
    private Long tId;
    /**
     * 类型 1.单聊 2.群聊
     */
    private Integer type;
    /**
     * 记录
     */
//    private Object datas;

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Long getfId() {
        return fId;
    }

    public void setfId(Long fId) {
        this.fId = fId;
    }

    public Long gettId() {
        return tId;
    }

    public void settId(Long tId) {
        this.tId = tId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public IMChatEvent(Object source) {
        super(source);
    }

    public IMChatEvent(Long groupId, Long fId, Long tId, Integer type, Object source){
        super(source);
        this.groupId = groupId;
        this.fId = fId;
        this.tId = tId;
        this.type = type;
//        this.datas = datas;
    }

    public IMChatEvent(Long groupId, Long fId, Long tId, Object source){
        super(source);
        this.groupId = groupId;
        this.fId = fId;
        this.tId = tId;
//        this.datas = datas;
    }
}
